package com.jet.cashier.controller;

import com.jet.cashier.service.CashierMemberOrderService;
import com.jet.core.result.ResultJson;
import com.jet.member.domain.vo.MemberSummaryCashierVo;
import org.springframework.web.bind.annotation.*;

/**
 * @author dcl
 * @since 2025/2/21 16:13
 */
@RestController
@RequestMapping(value = {"/member", "cashier-member-order"})
public class CashierMemberOrderController {

    private final CashierMemberOrderService cashierMemberOrderService;

    public CashierMemberOrderController(CashierMemberOrderService cashierMemberOrderService) {
        this.cashierMemberOrderService = cashierMemberOrderService;
    }
    
    @GetMapping("/summary-cashier/{id}")
    public ResultJson<MemberSummaryCashierVo> summaryCashier(@RequestHeader long merchantNo,
                                                             @RequestHeader long storeNo,
                                                             @RequestHeader String accountId,
                                                             @PathVariable("id") String memberId) {
        return ResultJson.ok(cashierMemberOrderService.summaryCashier(merchantNo, memberId));
    }
}
